<template>
  <div class="app-container">
    <div class="search-container">
      <el-form ref="queryFormRef" :model="queryForm" :inline="true">
        <!-- StartDate  EndDate -->
        <el-form-item prop="keywords">
          <el-input v-model="queryForm.keywords" placeholder="请输入关键字" clearable style="width: 200px" />
          <el-button type="primary" style="margin-left: 0; border-radius: 0" @click="handleQuery"> 搜索 </el-button>
        </el-form-item>
      </el-form>
      <el-row :gutter="20">
        <el-col :span="4" :offset="0"> </el-col>
      </el-row>
    </div>
    <div class="table-container"></div>
  </div>
</template>
<script setup lang="ts">
import { QueryPageSalaryInquiry } from "@/api/wage/index";

const loading = ref(false);
const tableData = ref();

const tableRef = ref();

//查询条件
const queryForm = reactive({
  keywords: "",
  pageIndex: 1,
  pageSize: 10,
});
const total = ref(0);
//这是列表数据
const handleQuery = function () {
  loading.value = true;
  QueryPageSalaryInquiry(queryForm)
    .then((res) => {
      if (res.type === 0) {
        if (res.success) {
          tableData.value = res.data.list;
          queryForm.pageIndex = res.data.pageNum;
          queryForm.pageSize = res.data.pageSize;
          total.value = res.data.total;
        } else {
        }
      } else {
      }
    })
    .finally(() => {
      loading.value = false;
    });
};

onMounted(() => {
  // handleQuery();
});
</script>
<style scoped>
:deep(.el-button) {
  margin-left: 5px;
}
:deep(.el-input__wrapper) {
  border-radius: 0;
}
</style>
